/*
 * Copyright (C) Kreogist Dev Team
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef KNMUSICPLAYLISTTREEVIEW_H
#define KNMUSICPLAYLISTTREEVIEW_H

#include "knmusictreeviewbase.h"

/*!
 * \brief The KNMusicPlaylistTreeView class provides a tree view widget to
 * display the content of a playlist.
 */
class KNMusicPlaylistTreeView : public KNMusicTreeViewBase
{
    Q_OBJECT
public:
    /*!
     * \brief Construct a KNMusicPlaylistTreeView widget.
     * \param parent The parent widget of the tree view.
     * \param tab The music tab of the tree view belongs to.
     */
    explicit KNMusicPlaylistTreeView(QWidget *parent = 0,
                                     KNMusicTab *tab = 0);

signals:

public slots:
    /*!
     * \brief Play the current playlist model.
     * \return If the playlist is already playing, then return false. Or else
     * return true.
     */
    bool playCurrentPlaylist();

protected:
    /*!
     * \brief Reimplemented from KNMusicTreeViewBase::resetHeaderState().
     */
    void resetHeaderState() Q_DECL_OVERRIDE;
};

#endif // KNMUSICPLAYLISTTREEVIEW_H
